<template>

</template>

<script lang="ts">
import {defineComponent, reactive, computed, inject, watchEffect, SetupContext} from 'vue'

// props的推断类型，否则直接使用props.title，会报错
interface PropsData {
  [key: string]: unknown
}

export default defineComponent({
  name: 'HelloWorld',
  props: {
    title: String,
  },
  setup(props: PropsData, ctx: SetupContext) {
    console.log(props.title)
    console.log('attrs----',ctx.attrs)
    console.log('emit----',ctx.emit)
    console.log('slots----',ctx.slots)
  }
})

</script>

<style scoped>

</style>
